<?php
/**
 * Created by PhpStorm.
 * User: Sky
 * Date: 16/1/26
 * Time: 上午10:10
 */

use yii\helpers\Html;
use yii\helpers\Url;
use app\lib\WeixinUtils;

/* @var $this yii\web\View */
/* @var $content string 字符串 */


$web = Url::to("@web");
?>

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta content="telephone=no" name="format-detection" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <title>领取的礼卡</title>
    <link href="<?= $web ?>/css/global.css" rel="stylesheet" />
    <link href="<?= $web ?>/css/wx/gift-receive-detail.css" rel="stylesheet" />
    <script src="<?= $web ?>/js/jquery.js"></script>
    <script src="<?= $web ?>/js/tools.js"></script>
    <meta charset="utf-8" />

    <script type="text/javascript">
        $(function ()
        {
            // 任何需要执行的js特效
            var w = $(document).width();
            if (w > 640)
            {
                w = 640;
            }
            $("body").css("font-size", w * 20 / 320);
        });

        function linkGoodsChose(){
            window.location.href="<?=Url::to(["wx-biz/good-chose"]);?>?id=<?=$card_code_id?>";
        }
    </script>
</head>
<body>
<div class="main">
    <div class="gift-container">
        <div class="title-container" style="background-image: url(<?= $web ?>/img/wx/gift-receive-detail/title-bg-normal.png);">
            <div class="title-content">
                <div class="logo" style="background-image: url(<?= $web ?>/img/wx/gift-receive-detail/rectangle.png);"></div>
                <div class="logo-text-card" style="background-image: url(<?= $web ?>/img/wx/gift-receive-detail/rectangle-card.png);"> </div>
                <div class="title">
                    <table cellspacing="0" cellpadding="0">
                        <tr>
                            <td id="title-main"><?=$card['NAME']?></td>
                        </tr>
                        <tr>
                            <td id="title-desc">有效期：<?=$card['VALID_DATE_MESSAGE']?></td>
                        </tr>
                    </table>
                </div>
            </div>
            <?php
                if($user!=null){
                    ?>
                    <div class="bless-container" >
                        <div class="user-head">
                            <img src="<?= $user['HEADER_URL'] ?>" />
                        </div>
                        <div class="user-bless">
                            <table cellpadding="0" cellspacing="0">
                                <tr>
                                    <td id="user-target"><?= $user['NICK_NAME'] ?>：</td>
                                </tr>
                                <tr>
                                    <td id="bless-text">我在朵拉盒为您选了一张朵拉礼卡，祝您万事如意。</td>
                                </tr>
                            </table>
                        </div>
                    </div>

                    <?php
                }
            ?>



        </div>
    </div>
    <div class="exchange-info">
        <div>恭喜您，获得了 <span>一张朵拉卡</span> </div>
    </div>
    <div class="btn-exchange" onclick="linkGoodsChose()">立即使用</div>
</div>
</body>
</html>
